import request from '../utils/request'
// import qs from 'qs'
// 请求 banner接口

const fetchBanner = (params = {}) => request.get('banner/list', { params })
// 请求分类接口
const fetchCates = (params = {}) => request.get('shop/goods/category/all', { params })
// 商品列表接口
/* const fetchItems = (params = {}) => request.post('shop/goods/list', qs.stringify(params)) */
const fetchItems = (params = {}) => request.post('shop/goods/list', params)
// 商品详情
const fetchItemById = (id) => request.get('shop/goods/detail?id=' + id)
export {
  fetchBanner,
  fetchCates,
  fetchItems,
  fetchItemById
}
